package com.situ.edu.service.impl;

import com.situ.edu.dao.IUserDao;
import com.situ.edu.dao.impl.UserDaoImpl;
import com.situ.edu.pojo.entity.User;
import com.situ.edu.service.IUserService;

import java.util.List;

public class UserServiceImpl implements IUserService {
    private IUserDao userDao = new UserDaoImpl();
    @Override
    public User login(String name, String password) {
        return userDao.login(name,password);
    }

    @Override
    public List<User> selectAll() {
        return userDao.selectAll();
    }

    @Override
    public void updatePass(int id, String newPass) {
        userDao.updatePass(id,newPass);
    }

    @Override
    public User selectById(int id) {
        return userDao.selectById(id);
    }

    @Override
    public void updatePic(User user) {
        userDao.updatePic(user);
    }
}
